package org.devocean.groupbuying.domain;

import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;

// @Entity
@SuppressWarnings("serial")
public class Cart implements Serializable {

	// @Id
	// private Integer cartID;
	// private Date date;
	private Double amount = 0.0;
	// private String cartInfo;

	// @OneToMany(fetch = FetchType.LAZY, cascade = CascadeType.ALL)
	// @JoinColumn(name = "cartID", referencedColumnName = "cartID")
	private List<CartItem> cartItems = new ArrayList<CartItem>();

	public Cart() {
	}

	public List<CartItem> getCartItems() {
		return cartItems;
	}

	public void setCartItems(List<CartItem> cartItems) {
		this.cartItems = cartItems;
	}

	public Double getAmount() {
		return amount;
	}

	public void setAmount(Double amount) {
		this.amount = amount;
	}

	@Override
	public String toString() {
		return "Cart [amount=" + amount + ", cartItems=" + cartItems + "]";
	}

}
